<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<script>

    mui.plusReady(function() {
        //获取系统名称
        var name = plus.os.name;
        VM.list.push({
            "title": "系统名称",
            "value": name
        })
        //获取系统版本
        var version = plus.os.version;
        VM.list.push({
            "title": "系统版本",
            "value": version
        })
        //设备型号
        VM.list.push({
            "title": "设备型号",
            "value": plus.device.model
        })
        //获取生产厂商
        var vendor2 = plus.device.vendor
        VM.list.push({
            "title": "生产厂商",
            "value": vendor2
        })
        //获取系统供应商
        var vendor = plus.os.vendor
        VM.list.push({
            "title": "系统供应商",
            "value": vendor
        })
        //获取系统语言信息
        var language = plus.os.language;
        VM.list.push({
            "title": "系统语言信息",
            "value": language
        })

        var types = {}; //网络类型
        types[plus.networkinfo.CONNECTION_UNKNOW] = "未知";
        types[plus.networkinfo.CONNECTION_NONE] = "未连接网络";
        types[plus.networkinfo.CONNECTION_ETHERNET] = "有线网络";
        types[plus.networkinfo.CONNECTION_WIFI] = "WiFi网络";
        types[plus.networkinfo.CONNECTION_CELL2G] = "2G蜂窝网络";
        types[plus.networkinfo.CONNECTION_CELL3G] = "3G蜂窝网络";
        types[plus.networkinfo.CONNECTION_CELL4G] = "4G蜂窝网络";
        var network = types[plus.networkinfo.getCurrentType()];
        VM.list.push({
            "title": "网络类型",
            "value": network
        })
        //获取设备的唯一标示
        plus.device.getInfo({
            success: function(e) {
                VM.list.push({
                    "title": "国际移动设备身份码imei",
                    "value": e.imei
                })
                VM.list.push({
                    "title": "国际移动用户识别码imsi",
                    "value": e.imsi
                })
                VM.list.push({
                    "title": "设备的唯一标识",
                    "value": e.uuid
                })
            },
            fail: function(e) {
                console.log('getDeviceInfo failed: ' + JSON.stringify(e));
            }
        });
        //获取APP版本信息
        plus.runtime.getProperty(plus.runtime.appid, function(inf) {
            var ver = inf.version;
            VM.list.push({
                "title": "APP名称",
                "value": inf.name
            })
            VM.list.push({
                "title": "APP版本信息",
                "value": "版本："+inf.version+"；版本号："+inf.versionCode
            })
            console.log(JSON.stringify(inf))
        })


    });
</script>
</body>
</html>